From e0b31b6b3d8f86d9f88afcdb9fdb67cc787580e7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 4 Feb 2015 10:12:49 -0800 Subject: [PATCH] Update to the most current nightly --- Cargo.lock | 102 +++++++++++----------- src/cargo/core/resolver/mod.rs | 12 +-- src/cargo/lib.rs | 2 +- src/cargo/ops/cargo_generate_lockfile.rs | 2 +- src/cargo/ops/cargo_rustc/custom_build.rs | 2 +- src/cargo/ops/cargo_rustc/mod.rs | 2 +- src/cargo/ops/cargo_test.rs | 4 +- src/cargo/ops/registry.rs | 2 +- src/rustversion.txt | 2 +- tests/resolve.rs | 2 - tests/test_cargo_build_auth.rs | 4 +- 11 files changed, 67 insertions(+), 69 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fe2cbe6f6..0248908a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,24 +3,24 @@ name = "cargo" version = "0.1.0" dependencies = [ "advapi32-sys 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "curl 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.6.32 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 0.6.34 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)", - "log 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "registry 0.1.0", - "rustc-serialize 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "term 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -28,7 +28,7 @@ name = "advapi32-sys" version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -38,42 +38,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "curl" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "curl-sys" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "docopt" -version = "0.6.32" +version = "0.6.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "env_logger" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -96,8 +96,8 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libgit2-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -112,10 +112,10 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#70d572f27ebbffb5a8 [[package]] name = "kernel32-sys" -version = "0.0.5" +version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -125,12 +125,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libgit2-sys" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libssh2-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libssh2-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -144,11 +144,11 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "log" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -180,7 +180,7 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.2.18" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -199,40 +199,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "registry" version = "0.1.0" dependencies = [ - "curl 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-serialize" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "semver" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "tar" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "term" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -246,23 +246,23 @@ dependencies = [ [[package]] name = "toml" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc-serialize 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "url" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/src/cargo/core/resolver/mod.rs b/src/cargo/core/resolver/mod.rs index cdd356e8f..a22964504 100644 --- a/src/cargo/core/resolver/mod.rs +++ b/src/cargo/core/resolver/mod.rs @@ -178,7 +178,7 @@ fn activate(mut cx: Box, // First, figure out our set of dependencies based on the requsted set of // features. This also calculates what features we're going to enable for // our own dependencies. - let deps = try!(resolve_features(&mut *cx, &**parent, method)); + let deps = try!(resolve_features(&mut cx, parent, method)); // Next, transform all dependencies into a list of possible candidates which // can satisfy that dependency. @@ -204,7 +204,7 @@ fn activate(mut cx: Box, // Workaround compilation error: `deps` does not live long enough let platform = platform.map(|s| &*s); - Ok(match try!(activate_deps(cx, registry, &**parent, platform, &*deps, 0)) { + Ok(match try!(activate_deps(cx, registry, parent, platform, &deps, 0)) { Ok(cx) => { cx.visited.borrow_mut().remove(parent.get_package_id()); Ok(cx) @@ -265,7 +265,7 @@ fn activate_deps<'a>(cx: Box, // incompatible with all other activated versions. Note that we define // "compatible" here in terms of the semver sense where if the left-most // nonzero digit is the same they're considered compatible. - let mut my_candidates = candidates.iter().filter(|&b| { + let my_candidates = candidates.iter().filter(|&b| { prev_active.iter().any(|a| a == b) || prev_active.iter().all(|a| { !compatible(a.get_version(), b.get_version()) @@ -312,7 +312,7 @@ fn activate_deps<'a>(cx: Box, // Oh well, we couldn't activate any of the candidates, so we just can't // activate this dependency at all - Ok(activation_error(&*cx, registry, last_err, parent, dep, prev_active, + Ok(activation_error(&cx, registry, last_err, parent, dep, prev_active, &candidates[])) } @@ -336,7 +336,7 @@ fn activation_error(cx: &Context, dep.get_name()); 'outer: for v in prev_active.iter() { for node in cx.resolve.graph.iter() { - let mut edges = match cx.resolve.graph.edges(node) { + let edges = match cx.resolve.graph.edges(node) { Some(edges) => edges, None => continue, }; @@ -433,7 +433,7 @@ fn resolve_features<'a>(cx: &mut Context, parent: &'a Summary, let deps = deps.iter().filter(|d| d.is_transitive() || dev_deps); // Second, ignoring dependencies that should not be compiled for this platform - let mut deps = deps.filter(|d| { + let deps = deps.filter(|d| { match method { Method::Required(_, _, _, Some(ref platform)) => { d.is_active_for_platform(platform.as_slice()) diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index c8a20b609..28b2696ae 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -153,7 +153,7 @@ pub fn handle_error(err: CliError, shell: &mut MultiShell) { } else { output(error.to_string(), shell, fatal); } - if !handle_cause(&*error, shell) || hide { + if !handle_cause(&error, shell) || hide { let _ = shell.err().say("\nTo learn more, run the command again \ with --verbose.".to_string(), BLACK); } diff --git a/src/cargo/ops/cargo_generate_lockfile.rs b/src/cargo/ops/cargo_generate_lockfile.rs index 91de74327..137cb143f 100644 --- a/src/cargo/ops/cargo_generate_lockfile.rs +++ b/src/cargo/ops/cargo_generate_lockfile.rs @@ -85,7 +85,7 @@ pub fn update_lockfile(manifest_path: &Path, if !visited.insert(dep) { return } set.insert(dep); match resolve.deps(dep) { - Some(mut deps) => { + Some(deps) => { for dep in deps { fill_with_deps(resolve, dep, set, visited); } diff --git a/src/cargo/ops/cargo_rustc/custom_build.rs b/src/cargo/ops/cargo_rustc/custom_build.rs index 73bac0682..ada89b6e6 100644 --- a/src/cargo/ops/cargo_rustc/custom_build.rs +++ b/src/cargo/ops/cargo_rustc/custom_build.rs @@ -141,7 +141,7 @@ pub fn prepare(pkg: &Package, target: &Target, req: Platform, Some(value.as_slice())); } } - p = try!(super::add_plugin_deps(p, &*build_state, plugin_deps)); + p = try!(super::add_plugin_deps(p, &build_state, plugin_deps)); } // And now finally, run the build command itself! diff --git a/src/cargo/ops/cargo_rustc/mod.rs b/src/cargo/ops/cargo_rustc/mod.rs index f5a2a16bb..4f097c387 100644 --- a/src/cargo/ops/cargo_rustc/mod.rs +++ b/src/cargo/ops/cargo_rustc/mod.rs @@ -767,7 +767,7 @@ fn each_dep<'a, F>(pkg: &Package, cx: &'a Context, mut f: F) { if !visited.insert(pkg.get_package_id()) { return } f(pkg); - let mut deps = match cx.resolve.deps(pkg.get_package_id()) { + let deps = match cx.resolve.deps(pkg.get_package_id()) { Some(deps) => deps, None => return, }; diff --git a/src/cargo/ops/cargo_test.rs b/src/cargo/ops/cargo_test.rs index 28ca81262..2355d13bd 100644 --- a/src/cargo/ops/cargo_test.rs +++ b/src/cargo/ops/cargo_test.rs @@ -24,7 +24,7 @@ pub fn run_tests(manifest_path: &Path, compile.tests.sort(); let target_name = options.name; - let mut tests_to_run = compile.tests.iter().filter(|&&(ref test_name, _)| { + let tests_to_run = compile.tests.iter().filter(|&&(ref test_name, _)| { target_name.map_or(true, |target_name| target_name == test_name.as_slice()) }); @@ -52,7 +52,7 @@ pub fn run_tests(manifest_path: &Path, if options.compile_opts.env == "bench" { return Ok(None) } - let mut libs = compile.package.get_targets().iter().filter_map(|target| { + let libs = compile.package.get_targets().iter().filter_map(|target| { if !target.get_profile().is_doctest() || !target.is_lib() { return None } diff --git a/src/cargo/ops/registry.rs b/src/cargo/ops/registry.rs index 3c69c0c60..60f2f9202 100644 --- a/src/cargo/ops/registry.rs +++ b/src/cargo/ops/registry.rs @@ -199,7 +199,7 @@ pub fn http_timeout(config: &Config) -> CargoResult> { Some((s, _)) => return Ok(Some(s)), None => {} } - Ok(os::getenv("HTTP_TIMEOUT").and_then(|s| s.parse())) + Ok(os::getenv("HTTP_TIMEOUT").and_then(|s| s.parse().ok())) } pub fn registry_login(config: &Config, token: String) -> CargoResult<()> { diff --git a/src/rustversion.txt b/src/rustversion.txt index 3be7f9e82..54b77685e 100644 --- a/src/rustversion.txt +++ b/src/rustversion.txt @@ -1 +1 @@ -2015-01-30 +2015-02-03 diff --git a/tests/resolve.rs b/tests/resolve.rs index a5e1c85f5..6bc67fc88 100644 --- a/tests/resolve.rs +++ b/tests/resolve.rs @@ -1,5 +1,3 @@ -#![feature(collections)] - extern crate hamcrest; extern crate cargo; diff --git a/tests/test_cargo_build_auth.rs b/tests/test_cargo_build_auth.rs index d91101c23..646db4fd8 100644 --- a/tests/test_cargo_build_auth.rs +++ b/tests/test_cargo_build_auth.rs @@ -49,7 +49,7 @@ test!(http_auth_offered { assert_eq!(req, vec![ "GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1", "Accept: */*", - "User-Agent: git/1.0 (libgit2 0.22.0)", + "User-Agent: git/1.0 (libgit2 0.21.0)", ].into_iter().map(|s| s.to_string()).collect()); drop(s); @@ -64,7 +64,7 @@ test!(http_auth_offered { "GET /foo/bar/info/refs?service=git-upload-pack HTTP/1.1", "Authorization: Basic Zm9vOmJhcg==", "Accept: */*", - "User-Agent: git/1.0 (libgit2 0.22.0)", + "User-Agent: git/1.0 (libgit2 0.21.0)", ].into_iter().map(|s| s.to_string()).collect()); }); -- 2.30.2